package com.easy.mapper;

import com.easy.bean.Purchase_order;
import com.easy.util.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface PurchaseOrderDao {
    int add(@Param("param") Purchase_order order);
    int del(@Param("id") Integer id);
    int edit(@Param("param") Purchase_order order);
    Purchase_order one(@Param("id") Integer id);
    List<Purchase_order> all(
            @Param("supplier_id") Integer supplierId,
            @Param("material_id") Integer materialId
    );
    int pageCount(@Param("param") Purchase_order order);
    List<Purchase_order> page(@Param("page") Page page, @Param("param") Purchase_order order);
    
    // 添加：根据采购申请ID查找采购订单
    Purchase_order getByRequestId(@Param("requestId") Integer requestId);
}